import React, { useEffect, useState } from 'react';
import { Card, Form, Space } from 'antd';
import FormCondition from '@/components/FormCondition';
import { connect } from 'umi';
import { ExclamationCircleOutlined } from '@ant-design/icons'
import Operation from '@/components/Operational';
const SettingCard = (props) => {
  const { data } = props;
  const [activeTabKey, setActiveTabKey] = useState('operational');
  const tabList = [
    {
      key: 'operational',
      tab: '运营设置',
    },
  ];
  const contentList = {
    operational: <Operation  detail={data}></Operation>,
  };

  return (
    <Card
      style={{
        width: '100%',
        marginTop: 24
      }}
      tabList={tabList}
      activeTabKey={activeTabKey}
      onTabChange={(key) => {
        setActiveTabKey(key);
      }}
    >
      {contentList[activeTabKey]}
    </Card>
  );
};

export default connect(({ commodity, loading }) => ({
  loading: loading.effects['commodity/fakeDeleteOfflineGoods']
}))(SettingCard);
;
